#include "gameplaycenterpanel.h"
#include "ui_playcenterpanel.h"
#include <QDebug>
GamePlayCenterPanel::GamePlayCenterPanel(QWidget *parent,int make[],
                                         QVector<Poker*> & own_poker_v,
                                         QVector<Poker*> & other_poker_v,
                                         int *last_numer_v,
                                         int *next_number_v):
    CenterPanelBase(parent),
//    ui(new Ui::PlayCenterPanel),
    poker_mark(make),
    own_poker(own_poker_v),
    other_poker(other_poker_v),
    last_number(last_numer_v),
    next_number(next_number_v)
{
//    ui->setupUi(this);
    set_space();//设置区间
}

//设置空间
void GamePlayCenterPanel::set_space(){
    int pos_x = 1540;
    int pos_y = 920;
    //设置上家区间
    last_space.setRect(0,0,pos_x/4,pos_y/4*3);
    qDebug() << "上家区间:" << last_space;
    //出牌区域
    out_card_space.setRect(pos_x/4,0,pos_x/2,pos_y/4*3);
    qDebug() << "出牌区域:" << out_card_space;
    //设置下家区间
    next_space.setRect(pos_x/4*3,0,pos_x/4,pos_y/4*3);
    qDebug() << "下家区间:" << next_space;
    //设置自己区间
    own_space.setRect(0,pos_y/4*3,pos_x,pos_y/4);
    qDebug() << "自己区间:" << own_space;
}

//get
const QRect& GamePlayCenterPanel::getLast_space() const{
      return last_space;
}

const QRect& GamePlayCenterPanel::getOwn_space() const{
    return own_space;
}

const QRect& GamePlayCenterPanel::getNext_space() const{
    return next_space;
}

const QRect& GamePlayCenterPanel::getOut_card_space() const{
    return out_card_space;
}

const int * GamePlayCenterPanel::getLast_number() const{
    return this->last_number;
}
const int * GamePlayCenterPanel::getNext_number() const{
    return this->next_number;
}

void GamePlayCenterPanel::init_all(){
    show_last();
    show_myself();
    show_next();
    show_out_poker();
}

void GamePlayCenterPanel::show_last(){

}

void GamePlayCenterPanel::show_myself(){

}

void GamePlayCenterPanel::show_next(){

}

void GamePlayCenterPanel::show_out_poker(){

}


GamePlayCenterPanel::~GamePlayCenterPanel()
{
//    delete ui;
}
